Location : picowiki » Configurable Functions in Quatsch
Configurable Functions in Quatsch
Heightmaps
Heightmaps in form of image-files (e.g. created with the GIMP, terraform, or from real life data) are supported by the following configurable function. DEM support is not (yet?) available.
([Heightmap
width {<real-number>} // optional, default: 10000
depth {<real-number>} // optional, default: 10000
height{<real-number>} // optional, default: 1000
filename{<filename>} // mandatory --> relative to scene
// file, e.g. "filename{canyon.png}"
filter{nearest |
bilinear |
cosine |
cubic
} // optional, default: cubic
// --> quality of interpolation between
// pixels of heightmap
] x y)E.g., to load some canyon-heightmap named "canyons.bmp" which is placed in the same folder as your scene, and which engrosses a real-life-region of 15*15 kilometers, and which describes heights between 0 and 500 meters, use this:
// Example
([Heightmap
width{15000} depth{15000}
height{500}
filename{canyon.bmp}
] x y)Currently supported formats include: bmp, png, jpeg, tif, gif.
The 'recommended format' for re-distribution is 'png', as it compresses lossless, is standardized and open.
Libnoise Support
Libnoise (http://libnoise.sourceforge.net/) is a free (as in freedom) library which provides several noise generators and ways to combine them arbitrarily. We believe that this is a great and flexible library of very good quality, and it's an awesome example of how to write re-usable code. Picogen supports the noise generators of libnoise. Note that because picogen does already have its own heightmap modelling language, most functions of libnoise are not "needed", so "complete integration" would be nonsense.
Perlin
This function provides libnoise's implementation of Perlin Noise. See also libnoise' documentation
([LibnoisePerlin
frequency{<real-number>} // optional, default: 1.0
lacunarity{<real-number>} // optional, default: 2.0
octave-count{<integral-number>} // optional, default: 6
persistence{<real-number>} // optional, default: 0.5
seed{<integral-number>} // optional, default: 0
] x y) // x and y can be any valid expressionBillow
This function provides libnoise's Billow noise. See also libnoise' documentation
([LibnoiseBillow
frequency{<real-number>} // optional, default: 1.0
lacunarity{<real-number>} // optional, default: 2.0
octave-count{<integral-number>} // optional, default: 6
persistence{<real-number>} // optional, default: 0.5
seed{<integral-number>} // optional, default: 0
] x y) // x and y can be any valid expressionRidged Multifractal Perlin Noise
This function provides libnoise's implementation of ridged multifractal noise. See also libnoise' documentation
([LibnoiseRidgedMulti
frequency{<real-number>} // optional, default: 1.0
lacunarity{<real-number>} // optional, default: 2.0
octave-count{<integral-number>} // optional, default: 6
seed{<integral-number>} // optional, default: 0
] x y) // x and y can be any valid expressionVoronoi
This function provides libnoise's implementation of Voronoi noise. See also libnoise' documentation
([LibnoiseVoronoi
frequency{<real-number>} // optional, default: 1.0
displacement{<real-number>} // optional, default: 1.0
enable-distance{<0 or 1>} // optional, default: 0 (1 = enabled, 0 = disabled)
seed{<integral-number>} // optional, default: 0
] x y) // x and y can be any valid expressionCylinders
This function provides libnoise's Cylinders generator. See also libnoise' documentation
([LibnoiseCylinders
frequency{<real-number>} // optional, default: 1.0
] x y) // x and y can be any valid expressionSpheres
This function provides libnoise's Spheres generator. See also libnoise' documentation
([LibnoiseSpheres
frequency{<real-number>} // optional, default: 1.0
] x y) // x and y can be any valid expression